22

|

2 Fundamentals of Information, Signal and System Theory

% Generation of signals and graphical representation in the subplot

subplot(221)

squ = square(2*t);

hold on

plot(t/pi,squ,'.-',t/pi, sin(2*f*t))

ylabel('squ_t')

xlabel('t / \pi')

title('Rectangular signal')

grid on

subplot(222)

saw = sawtooth(2*f*t);

plot(t/pi,saw)

ylabel('saw_t')

xlabel('t / \pi')

title('Sawtooth signal')

grid on

subplot(223)

tri = triangle(2*f*t);

plot(t/pi,tri)

ylabel('tri_t')

xlabel('t / \pi')

title('Triangle signal')

grid on

subplot(224)

arb = -0.5*sin(2*f*t)+0.5*sin(2*2*f*t);

plot(t/pi,arb)

ylabel('arb_t')

xlabel('t / \pi')

title('Arbitrary superposition of harmonic signals')

grid on

Quasi-periodic signals, such as the ECG signal in Figure 2.12, however, do not exactly

fulfil this condition. The period T0 changes with each current period of the signal by

±T. This behaviour can be expressed by the so-called instantaneous period duration

Ti = {T1, T2, . . . , TN}, i:

s(t) = s(t + kT0)

(periodic)

s(t)s(t + kT0)

(quasi-periodic)

t , k.

(2.18)